<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script src="../../js/jquery-1.9.1.min.js"></script>
<script src="../../js/angular.min.js"></script>
<body ng-app="zhengmian" ng-controller="zmCtrl">
<table align="center">
    <tr>
        <td></td>
        <td style="BORDER-right: #000000 1px solid;"></td>
        <td class="tWidth10" colspan="{{width}}" style="text-align: center;BORDER-right: #000000 1px solid;">{{(width)*960}}</td>
    </tr>

    <tr>
        <td style="width:51px;border-bottom: #000000 1px solid;"></td>
        <td style="width:51px;BORDER-right: #000000 1px solid;border-bottom: #000000 1px solid;"></td>
        <td ng-repeat="singleWidth in eachWidth" style="text-align: center;width:51px;BORDER-right: #000000 1px solid;border-bottom: #000000 1px solid;">960</td>
    </tr>

    <tr>
        <td rowspan="{{height+product.line+1}}" style="border-bottom: #000000 1px solid;">{{(height)*960}}</td>
    </tr>

    <tr ng-repeat="singleHeight in eachHeight">
        <td style="height:51px;BORDER-right: #000000 1px solid;border-bottom: #000000 1px solid;">960</td>
        <td ng-repeat="singleWidth in eachWidth" style="BORDER-right: #000000 1px solid;border-bottom: #000000 1px solid;background-image:url(../static/img/td.jpg);"></td>
    </tr>

</table>
</body>
<script src="../../globalVar.js"></script>
<script>
    var app = angular.module('zhengmian', []);
    app.controller('zmCtrl', function ($scope, $http) {

        function GetQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null)return unescape(r[2]);
            return null;
        }

        $scope.width = parseInt(GetQueryString("width"));
        $scope.height = parseInt(GetQueryString("height"));

        $scope.token = localStorage.getItem("token");
        var modelId = localStorage.getItem("modelId");
        if (modelId === null) {
            $scope.modelId = 1;
        } else {
            $scope.modelId = modelId
        }


        $scope.eachWidth = [];
        for (var i = 0; i < $scope.width; i++) {
            $scope.eachWidth.push(i);
        }

        $scope.eachHeight = [];
        for (var i = 0; i < $scope.height; i++) {
            $scope.eachHeight.push(i);
        }

    });
</script>
</html>